Skip to content

[WIP] Expand dependency management and automate updates#49

Merged
Stensel8 merged 2 commits into
developmentfrom
claude/expand-dependency-management-further
Mar 29, 2026
Merged

[WIP] Expand dependency management and automate updates#49
Stensel8 merged 2 commits into
developmentfrom
claude/expand-dependency-management-further

Conversation

@Claude

@Claude Claude AI commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Expand Dependency Management System

This PR expands the dependency management system to provide comprehensive coverage and automation.

Phase 1: Expand Dependency Checks ✅

  • Analyze current dependency management system
  • Add Kubernetes version checking (kubectl v1.32)
  • Add Kubernetes minikube version tracking
  • Add Terraform version tracking (uses HashiCorp repos)
  • Add Podman version tracking (uses distro repos)
  • Add OpenSSH version tracking (uses distro repos)
  • Update summary job to include all new checks

Phase 2: Automated PR Creation ✅

  • Create auto-update-dependencies workflow
  • Trigger on dependency issue creation/updates
  • Create draft PRs with branch setup
  • Auto-link issues to PRs with proper references
  • Add detailed instructions in PR body
  • Handle NGINX, Ansible, and Kubernetes updates

Phase 3: Documentation ✅

  • Update README with new dependency checks
  • Document automated PR creation workflow
  • Explain issue-PR linking system

Phase 4: Testing 🔄

  • Test workflow syntax validation
  • Verify dependency check logic
  • Validate PR creation workflow

- Add Kubernetes, Terraform, Podman, and OpenSSH dependency checking
- Create auto-update-dependencies workflow for automated PR creation
- Link issues to PRs automatically with proper references
- Update README with expanded dependency management documentation

Agent-Logs-Url: https://github.com/Stensel8/Scripts/sessions/a9715b88-7029-4fed-8b1b-6f8a3b934ef6

Co-authored-by: Stensel8 <102481635+Stensel8@users.noreply.github.com>
@Claude Claude AI requested a review from Stensel8 March 28, 2026 20:17
Copilot stopped work on behalf of Stensel8 due to an error March 28, 2026 20:17
@Stensel8

Copy link
Copy Markdown
Owner

@claude[agent], why did you timeout. Please continue where you left off.

@Stensel8

Copy link
Copy Markdown
Owner

@copilot, waarom blijft deze PR falen? Rond je werk netjes af en tag/ping mij.

In .github/workflows/check-dependencies.yml regel 69 staat een typo:
bashecho "current=$CURRENT_OUTPUT" >> $GITHUB_OUTPUT
Dit moet zijn:
bashecho "current=$CURRENT_VERSION" >> $GITHUB_OUTPUT
De variabele heet CURRENT_VERSION, niet CURRENT_OUTPUT. Dit zorgt ervoor dat de PCRE2 check faalt.
Voor je vraag:

GitHub Copilot timeouts: Dit is een GitHub/Copilot infrastructure issue. Wacht even en probeer opnieuw, of maak de wijzigingen handmatig.
De workflow bug: Daar kan ik je mee helpen — wil je dat ik de fix voor je maak?

Copilot AI commented Mar 29, 2026

Copy link
Copy Markdown
Contributor

@Stensel8 The model claude-sonnet-4.6 is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 48dff3d5-039a-456d-b9ef-5bef9e397c82

1 similar comment

Copilot AI commented Mar 29, 2026

Copy link
Copy Markdown
Contributor

@Stensel8 The model claude-sonnet-4.6 is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 48dff3d5-039a-456d-b9ef-5bef9e397c82

@Stensel8

Copy link
Copy Markdown
Owner

@claude[agent] , waarom blijft deze PR falen? Rond je werk netjes af en tag/ping mij.

In .github/workflows/check-dependencies.yml regel 69 staat een typo:
bashecho "current=$CURRENT_OUTPUT" >> $GITHUB_OUTPUT
Dit moet zijn:
bashecho "current=$CURRENT_VERSION" >> $GITHUB_OUTPUT
De variabele heet CURRENT_VERSION, niet CURRENT_OUTPUT. Dit zorgt ervoor dat de PCRE2 check faalt.
Voor je vraag:

GitHub Copilot timeouts: Dit is een GitHub/Copilot infrastructure issue. Wacht even en probeer opnieuw, of maak de wijzigingen handmatig.

Copilot AI commented Mar 29, 2026

Copy link
Copy Markdown
Contributor

@Stensel8 The model claude-sonnet-4.6 is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 48dff3d5-039a-456d-b9ef-5bef9e397c82

Copilot AI commented Mar 29, 2026

Copy link
Copy Markdown
Contributor

@Stensel8 The model claude-sonnet-4.6 is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 48dff3d5-039a-456d-b9ef-5bef9e397c82

2 similar comments

Copilot AI commented Mar 29, 2026

Copy link
Copy Markdown
Contributor

@Stensel8 The model claude-sonnet-4.6 is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 48dff3d5-039a-456d-b9ef-5bef9e397c82

Copilot AI commented Mar 29, 2026

Copy link
Copy Markdown
Contributor

@Stensel8 The model claude-sonnet-4.6 is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 48dff3d5-039a-456d-b9ef-5bef9e397c82

@Stensel8 Stensel8 marked this pull request as ready for review March 29, 2026 10:40
Copilot AI review requested due to automatic review settings March 29, 2026 10:40
@Stensel8 Stensel8 merged commit d585b7a into development Mar 29, 2026
0 of 2 checks passed
@Stensel8 Stensel8 deleted the claude/expand-dependency-management-further branch March 29, 2026 10:40
Copilot stopped work on behalf of Stensel8 due to an error March 29, 2026 10:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the repository’s dependency-management automation by adding new dependency/version checks (notably Kubernetes) and introducing a workflow that auto-creates draft PRs in response to dependency update issues.

Changes:

  • Added Kubernetes dependency checking (kubectl + minikube) plus additional “reference” checks for Terraform/Podman/OpenSSH in the dependency-check workflow, and included them in the summary job.
  • Added a new “Auto-Update Dependencies” workflow that creates a draft PR/branch when a dependency update issue is opened/edited.
  • Updated README documentation to reflect the expanded checks and automated PR creation behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
README.md Documents newly tracked dependencies and the issue→draft PR automation flow.
.github/workflows/check-dependencies.yml Adds new dependency-check jobs (Kubernetes/Terraform/Podman/OpenSSH) and expands the summary job.
.github/workflows/auto-update-dependencies.yml New workflow to parse dependency update issues and create draft PRs/branches automatically.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +38 to +40
with:
script: |
const issueNumber = context.payload.issue?.number || ${{ github.event.inputs.issue_number }};

Copilot AI Mar 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can render invalid JavaScript for non-workflow_dispatch events. On issues events, ${{ github.event.inputs.issue_number }} expands to an empty value, producing const issueNumber = ... || ; which is a syntax error and will fail the workflow. Pass the dispatch input via env and read process.env, or use context.payload.inputs when event_name is workflow_dispatch.

Suggested change
with:
script: |
const issueNumber = context.payload.issue?.number || ${{ github.event.inputs.issue_number }};
env:
ISSUE_NUMBER: ${{ github.event.inputs.issue_number }}
with:
script: |
const issueNumber = context.payload.issue?.number || process.env.ISSUE_NUMBER;

Copilot uses AI. Check for mistakes.
Comment on lines +80 to +87
// Check if a PR already exists for this issue
const existingPRs = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
head: `${context.repo.owner}:${branchName.split('-').slice(0, -1).join('-')}`
});

Copilot AI Mar 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

existingPRs is fetched but never used. This adds an unnecessary API call and makes the script harder to follow; either remove it or use it as the primary existence check instead of listing all open PRs.

Suggested change
// Check if a PR already exists for this issue
const existingPRs = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
head: `${context.repo.owner}:${branchName.split('-').slice(0, -1).join('-')}`
});

Copilot uses AI. Check for mistakes.
Comment on lines +88 to +97
// Search for any PR that references this issue
const allPRs = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open'
});

const linkedPR = allPRs.data.find(pr =>
pr.body && pr.body.includes(`#${issueNumber}`)
);

Copilot AI Mar 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linked-PR detection uses pulls.list without pagination (per_page defaults to 30). In repos with >30 open PRs, this can miss an existing PR that references the issue and create duplicates. Prefer the Search API (querying for repo:... type:pr state:open "#<issueNumber>") or paginate through results.

Suggested change
// Search for any PR that references this issue
const allPRs = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open'
});
const linkedPR = allPRs.data.find(pr =>
pr.body && pr.body.includes(`#${issueNumber}`)
);
// Search for any open PR that references this issue using the Search API
const searchResults = await github.rest.search.issuesAndPullRequests({
q: `repo:${context.repo.owner}/${context.repo.repo} type:pr state:open "#${issueNumber}" in:body`
});
const linkedPRItem = searchResults.data.items.find(item => item.pull_request);
const linkedPR = linkedPRItem;

Copilot uses AI. Check for mistakes.
Comment on lines +334 to +342
// Search for existing issue
const issues = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
labels: 'dependencies,kubernetes'
});

const existingIssue = issues.data.find(issue => issue.title === issueTitle);

Copilot AI Mar 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issues.listForRepo is paginated (default 30). With labels: 'dependencies,kubernetes' this can miss an existing matching issue and create duplicates. Use per_page: 100 + pagination, or use the Search API to locate an issue by title/labels reliably.

Suggested change
// Search for existing issue
const issues = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
labels: 'dependencies,kubernetes'
});
const existingIssue = issues.data.find(issue => issue.title === issueTitle);
// Search for existing issue (paginate to avoid missing matches)
const issues = await github.paginate(
github.rest.issues.listForRepo,
{
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
labels: 'dependencies,kubernetes',
per_page: 100
}
);
const existingIssue = issues.find(issue => issue.title === issueTitle);

Copilot uses AI. Check for mistakes.
Comment on lines +102 to +108
// Add comment to issue
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
body: `A pull request already exists to address this update: #${linkedPR.number}`
});

Copilot AI Mar 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this workflow runs on both issues.opened and issues.edited, this block will post a new comment every time the issue is edited after a PR exists, which can spam the issue. Consider only commenting on opened, or check for an existing bot comment and update it instead of creating a new one.

Suggested change
// Add comment to issue
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
body: `A pull request already exists to address this update: #${linkedPR.number}`
});
// Only add a new comment on issue creation or non-issues events to avoid spam on edits
if (context.eventName !== 'issues' || context.payload.action === 'opened') {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
body: `A pull request already exists to address this update: #${linkedPR.number}`
});
} else {
console.log('Skipping duplicate issue comment for edited issue event.');
}

Copilot uses AI. Check for mistakes.
@Claude Claude AI mentioned this pull request Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants